<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>条件设置</title>
<import type="css" file="css.workform" />
<style type="text/css">
.TableHeader{background: none repeat scroll 0 0 #E0E0E0;}
</style>
<script>
function add_condition(flag)
{
var str;
if(document.form1.item_name.value.indexOf("'")>=0)
{
	alert("值中不能含有'号");
	return;
}
str="'"+document.form1.item_name.value+"'";
str+=document.form1.condition.value;
str+="'"+document.form1.item_value.value+"'";
if(flag=="1")
{
	 if(document.form1.proc_in.value.indexOf(str)<0)
			document.form1.proc_in.value+=str+"\n";
	 else
	 	  alert("条件重复！");
}
else
{
	 if(document.form1.proc_out.value.indexOf(str)<0)
			document.form1.proc_out.value+=str+"\n";
	 else
	 	  alert("条件重复！");
}
}
</script>
</head>
<body class="bodycolor" topmargin="5">

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
	<td class="Big"><img src="__PUBLIC__/images/edit.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3">步骤{$data_proc.proc_no} - 条件设置</span><br>
	</td>
</tr>
</table>
<br>
<table border="0" width="600" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="__APP__/WorkFlowSys/flow_process_condition_save" method="post" name="form1">
	<tr>
		<td height=30 class="TableHeader"><img src="__PUBLIC__/images/green_arrow.gif" align="absmiddle"> 条件生成器</td>
	</tr>
	<tr>
		<td class="TableData" align=center><b>
			字段 <select name="item_name" class="SmallSelect">
          <volist name="form_item" id="vo">
        	<option value="{$vo}">{$vo}
          </volist>
        </select>
			条件 <select name="condition" class="SmallSelect">
					 <option value="=">等于</option>
					 <option value=">">大于</option>
					 <option value="<">小于</option>
					 <option value=">=">大于等于</option>
					 <option value="<=">小于等于</option>
					 <option value="!=">不等于</option>
					</select>
			值 <input type="text" class="SmallInput" name="item_value" size=20><br><br>
			<input type="button" class="BigButton" value="添加到转入条件" onclick="add_condition(1)">&nbsp;&nbsp;
			<input type="button" class="BigButton" value="添加到转出条件" onclick="add_condition(2)"><br><br>
			</b>
		</td>
	</tr>
	<tr>
		<td height=30 class="TableHeader"><img src="__PUBLIC__/images/green_arrow.gif" align="absmiddle"> 转入条件</td>
	</tr>
	<tr>
		<td class="TableData">
			<b>合理设定转入条件，可形成流程的条件分支，但数据满足转入条件，才可转入本步骤</b>
			<textarea cols=80 name="proc_in" rows="6" class="BigInput" wrap="yes">{$data_proc.proc_in}</textarea><br>
		</td>
	</tr>
	<tr>
		<td height=30 class="TableHeader"><img src="__PUBLIC__/images/green_arrow.gif" align="absmiddle"> 转出条件</td>
	</tr>
	<tr>
		<td class="TableData">
			<b>合理设定转出条件，可对表单数据进行校验</b>
			<textarea cols=80 name="proc_out" rows="6" class="BigInput" wrap="yes">{$data_proc.proc_out}</textarea><br>
		</td>
	</tr>
	<tr align="center" class="TableControl">
	  <td colspan="2" nowrap>
		<input type='hidden' value="{$data_proc.type_id}" name="type_id">
		<input type="hidden" value="{$data_proc.proc_id}" name="proc_id">
		<input type='hidden' value="" name="GRAPH">
		<input type="submit"  value="保 存" class="BigButton" name="submit">&nbsp;&nbsp;
       	<input type="button" class="BigButton" value="返 回" onclick="history.back(-1);">
      </td>
	</tr>
</form>
</table>
</body>
</html>
